﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<%@ Import Namespace="CNTVNow.Web.Helpers.ExtensionMethods" %>
<%@ Import Namespace="CNTVNow.Web.Models" %>
<%@ Import Namespace="CNTVNow.Web.Helpers.Common" %>
<%@ Import Namespace="System.Collections.Generic" %>

<h1><span><%=Resources.Common.LastestNews%></span></h1>
<ul class="news02">
    <%if (ViewData["NewsLast"] != null)
        {
            var lstNews = (List<New>)ViewData["NewsLast"];
            //if (lstNews.Count == Config.NewsLatestNumber())
            {
                foreach (var news in lstNews)
                {
            %>
                    <li>
                        <div class="divblock">
                            <p><a href="Detail.cntv?n=<%=news.NewsID%>"><img src="<%=ResolveUrl(news.AvatarImage) %>" alt="" height="109" width="146" /></a></p>
                            <h3 class="style01"><a href="Detail.cntv?n=<%=news.NewsID%>"><%=news.NewsTitle %></a></h3>
                            <p><%=news.NewsDescription%></p>
                        </div>
                    </li>
            <%  }
            }
        }
        %>
</ul>